SERVER_PORT = 5000
SERVER_NAME = "localhost"
SERVER_HTTPS = False

# 店招
SHOP_NAME = "xxx店"

# 数据库配置
DB_STRING = "sqlite:///jxc.db"

# 分页配置
DEFAULT_PAGE_SIZE = 10
MIN_PAGE_SIZE = 10
MAX_PAGE_SIZE = 100

# API类型
API_TYPE = "local"

# 货币单位
CURRENCY_UNIT = "元"

# 扫描间隔时间(秒)
QR_SCAN_COOLDOWN = 1

# 用户密码最小长度
USER_PASSWORD_MIN_LENGTH = 6

# 微信支付配置
WECHAT_PAY_DATA = {
    "appid": "",
    "mch_id": "",
    "api_key": "",
    "body": SHOP_NAME
}

ALIPAY_DATA = {
    "app_id": "",
    "app_private_key": "",
    "alipay_public_key": "",
    "body": SHOP_NAME
}

# 首页热销TOP N个商品
TOP_SALE_PRODUCT_COUNT = 10

# 采购单每单最多采购商品数量
PURCHASE_MAX_PRODUCT_COUNT = 100

# 销售单每单最多销售商品数量
SALE_MAX_PRODUCT_COUNT = 50

# 绘图x轴达到最大刻度时翻转90度以免看不到
AXIS_X_MAX_TICKS = 15

# 允许排序的列
PRODUCT_ALLOW_SORT_COLUMNS = ["stock", "price"]
PURCHASE_ALLOW_SORT_COLUMNS = ["quantity", "total_price"]
SALE_ALLOW_SORT_COLUMNS = ["quantity", "total_price"]

# 日志配置
LOG_FILE = "logs/error.log"